import request from '@/utils/request'

// 获取友链列表
export const getLinkListAPI = (params) => {
  return request({
    url: '/link',
    method: 'GET',
    params
  })
}

// 获取友链详情
export const getLinkByIdAPI = (id) => {
  return request({
    url: `/link/${id}`,
    method: 'GET'
  })
}

// 新增
export const addLinkAPI = (data) => {
  return request({
    url: '/link',
    method: 'POST',
    data
  })
}

// 编辑
export const putLinkAPI = (id, data) => {
  return request({
    url: `/link/${id}`,
    method: 'PUT',
    data
  })
}

